package com.youlv.yl.entity.hotel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 订单支付表
 * </p>
 *
 * @author fenghe
 * @since 2022-01-25
 */
@Data
@TableName("h_order_pay")
@ApiModel(value = "OrderPay对象", description = "订单支付表")
public class OrderPay implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /** 订单号*/
    @TableField("no")
    private String no;

    /** 订单金额*/
    @TableField("paymoney")
    private Double paymoney;

    /** 订单标题*/
    @TableField("title")
    private String title;

    /** 支付表单*/
    @TableField("paytxt")
    private String paytxt;

    /**
     * 订单支付状态
     * 1.WAIT_BUYER_PAY（交易创建，等待买家付款）
     * 2.TRADE_CLOSED（未付款交易超时关闭，或支付完成后全额退款）
     * 3.TRADE_SUCCESS（交易支付成功）
     * 4.TRADE_FINISHED（交易结束，不可退款）*/
    @TableField("flag")
    private Integer flag;

    @ApiModelProperty("支付类型：1.支付宝 2.微信")
    @TableField("type")
    private Integer type;

    @TableField("ctime")
    private Date ctime;

    @TableField("utime")
    private Date utime;

    public OrderPay(String no, String title, double paymoney, String paytxt) {
        this.no = no;
        this.title = title;
        this.paymoney = paymoney;
        this.paytxt = paytxt;
        this.type=1;
        this.flag=1;
        this.ctime=new Date();
        this.utime=new Date();
    }
}
